package com.mikhailenko.transportMVC.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.mikhailenko.transportMVC.model.Criteria;

public interface CriteriaRepository extends JpaRepository<Criteria, Integer>{
    
    @Query("SELECT crit FROM criteria crit WHERE crit.group.id = :id ")
    List<Criteria> findByGroup(@Param("id") int id);
}
